{% extends 'test_orm/base.html' %}
{% block page_content %}

<div class="panel panel-primary">
    <div class="panel-heading">
        <h3 class="panel-title">增加员工</h3> <!--这里加标题 //-->
    </div>
    <div class="panel-body"> <!--将表格放在这个<div class="panel-body">的标签中 //-->
        <div class="row">
            <div class="col-md-6 col-md-offset-3">
                <!--通过class="form-horizontal"设置form为bootstrap form样式-->
                <form action="/test_orm/add_employee/" method="post" class="form-horizontal">
                    {% csrf_token %}
                    <div class="form-group">
                        <label for="name" class="col-md-4 control-label">姓名：</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" id="name" name="name" placeholder="请录入姓名">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="email" class="col-md-4 control-label">邮箱：</label>
                        <div class="col-md-8">
                            <input type="email" class="form-control" id="email" name="email" placeholder="请录入邮箱地址">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="salary" class="col-md-4 control-label">工资：</label>
                        <div class="col-md-8">
                            <input type="number" class="form-control" id="salary" name="salary" placeholder="请录入工资">

                        </div>
                    </div>
                    <div class="form-group">
                        <label for="info" class="col-md-4 control-label">电话地址：</label>
                        <div class="col-md-8">
                            <select class="form-control" name="info" id="info">
                                {% for info in info_list %}
                                <option value="{{ info.id}}"> {{ info.phone }}||{{ info.address }}</option>
                                {% endfor %}
                            </select> 　
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dep" class="col-md-4 control-label">部门：</label>
                        <div class="col-md-8">
                            <select class="form-control" name="dep" id="dep">
                                {% for dep in dep_list %}
                                <option value="{{ dep.id}}"> {{ dep.dep_name }}</option>
                                {% endfor %}
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="group" class="col-md-4 control-label">团体：</label>
                        <div class="col-md-8">
                            <select class="form-control" name="group" id="group" multiple="true">
                                {% for group in group_list %}
                                <option value="{{ group.id}}"> {{ group.group_name }}</option>
                                {% endfor %}
                            </select>
                        </div>
                        　
                    </div>
                    <div class="form-group">
                        <div class="col-md-offset-4 col-md-8">
                            <input type="submit" class="btn btn-primary" value="增加">
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

{% endblock %}
<!-- 以下block块给样式类赋值，class="active"//-->
{% block employeecls %}
active
{% endblock %}
